package net.helix.ui.panels.library;

import java.awt.datatransfer.Transferable;

import javax.swing.JComponent;
import javax.swing.TransferHandler;

import net.helix.engine.library.LibraryTreeNode;


public class LibraryPreviewTransferHandler extends TransferHandler {
	private static final long serialVersionUID = 1L;
	
	
	public LibraryPreview libraryPreview;
	public LibraryPreviewTransferHandler(LibraryPreview libraryPreview){
		super();
		this.libraryPreview = libraryPreview;
	}
	protected Transferable createTransferable(LibraryTreeNode node) {
		System.out.println("LibraryPreviewTransferHandler createTransferable");
		LibraryPathArrayTransferable transferable = new LibraryPathArrayTransferable(node);
		
		return transferable;
	}
	protected void exportDone(JComponent source, Transferable data, int action) {
	    System.out.println("exportDone, source=" + source.getClass().getName() + ", action="+action);	
	    
	    super.exportDone(source, data, action);
	}
	public int getSourceActions(JComponent c) {
		return TransferHandler.MOVE;
	}
}
